package org.tc.shopmall.mapper;

import org.apache.ibatis.annotations.Param;
import org.tc.shopmall.entity.Orders;
import org.tc.shopmall.entity.PageHelper;

import java.util.List;

public interface OrdersMapper {


    int insert(Orders record);

    //查询全部
    List<Orders> selectAllOrders();

    //根据下单时间查询或者订单ID查询
    List<Orders> selectAllDate(@Param("createordertime") String createordertime, @Param("id") Integer id);

    int updateByPrimaryKey(Orders record);

    int deleteByPrimaryKey(Integer id);

    Orders selectByPrimaryKey(Integer id);

    double QueryMonth(@Param("monthtime") String monthtime,
                      @Param("endtime") String endtime,
                      @Param("storeid") Integer storeid);

    double QueryDay(@Param("endtime") String endtime,
                    @Param("storeid") Integer storeid);

    int QueryDayOrder(@Param("monthtime") String monthtime,
                      @Param("endtime") String endtime,
                      @Param("storeid") Integer storeid);

    int QueryRorder(@Param("endtime") String endtime,
                    @Param("storeid") Integer storeid);


    int selectCount();

    int selectCountByshy(Integer salesclerkid);

    int updateOrder(Orders orders);

    List<Orders> selectAllOrder(PageHelper pageHelper);
    //获取最后插的订单id
    int getOrderLastId();


    List<Orders> QueryAllOrders(@Param("userid") Integer userid);
}